home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
dev
/
cross
/
GBDK-2.0.lha
/
GBDK
/
lib
/
get_prop.s
< prev
next >
Wrap
Text File
|
1998-10-12
|
388b
|
28 lines
.include "global.s"
.area _CODE
;; Get properties of sprite number C
.get_sprite_prop::
LD HL,#.OAM+3 ; Calculate origin of sprite info
SLA C ; Multiply C by 4
SLA C
LD B,#0x00
ADD HL,BC
LD A,(HL) ; Get sprite properties
LD E,A
RET
_get_sprite_prop::
PUSH BC
LDA HL,4(SP) ; Skip return address and registers
LD C,(HL) ; C = nb
CALL .get_sprite_prop
POP BC
RET